{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "e95721f5",
   "metadata": {},
   "source": [
    "# Single Ended Spiral Inductor Modeling with PyAEDT\n",
    "This example shows how to build a simple single-ended spiral inductor, setup ports, run simulation and generate the report with PyAEDT\n",
    "## Setup Dimension of Spiral Inductor\n",
    "- rin (um): Inner radius\n",
    "- width (um): Line width\n",
    "- spacing (um): Spacing betwee lines\n",
    "- thickness (um): Spiral metal thickness\n",
    "- Np: Sides of spiral\n",
    "- Nr: Rounds of spiral\n",
    "- gap (um): Gap betwee metal_1 and metal_2\n",
    "- Tsun (um): Thickness of substrate"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "8a8e6e26",
   "metadata": {
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "rin = 10\n",
    "width = 2\n",
    "spacing = 2\n",
    "thickness = 1\n",
    "Np = 8\n",
    "Nr = 6\n",
    "gap = 3\n",
    "Tsub = 6"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "aa8f5057",
   "metadata": {},
   "source": [
    "## Define Spiral Polyline Function"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "86b504f7",
   "metadata": {},
   "outputs": [],
   "source": [
    "import os\n",
    "import matplotlib.pyplot as plt\n",
    "from math import pi, cos, sin, tan, sqrt\n",
    "\n",
    "def spiral(rin=10, pitch=2, Np=8, Nr=10):\n",
    "    dtheta = 2 * pi / Np\n",
    "    theta = pi / 2\n",
    "    pts = [(rin, 0), (rin, rin * tan(dtheta / 2))]\n",
    "    rin = rin * tan(dtheta / 2) * 2\n",
    "\n",
    "    x = rin\n",
    "    r = rin\n",
    "    for i in range(Np):\n",
    "        r += 1\n",
    "        theta += dtheta\n",
    "        x = x + r * cos(theta)\n",
    "        dr = pitch / (x - rin)\n",
    "\n",
    "    for i in range(Nr * Np - int(Np / 2) - 1):\n",
    "        rin += dr\n",
    "        theta += dtheta\n",
    "        x0, y0 = pts[-1]\n",
    "        x1, y1 = x0 + rin * cos(theta), y0 + rin * sin(theta)\n",
    "        pts.append((x1, y1))\n",
    "\n",
    "    pts.append((x1, 0))\n",
    "    return pts"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "2e8ffaa7",
   "metadata": {},
   "source": [
    "## Build Geometry"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "b3f2f934",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Launching PyAEDT outside Electronics Desktop with CPython and Pythonnet\n",
      "Launching AEDT installation C:\\Program Files\\AnsysEM\\AnsysEM21.2\\Win64\n",
      "===================================================================================\n",
      "pyaedt info: Launching AEDT with module Pythonnet.\n",
      "pyaedt info: Ansoft.ElectronicsDesktop.2021.2 Started with process ID 21740.\n",
      "pyaedt info: Logger Started on D:\\temp\\pyaedt20211222_133101.log\n",
      "pyaedt info: pyaedt v0.4.17\n",
      "pyaedt info: Python version 3.8.7 (tags/v3.8.7:6503f05, Dec 21 2020, 17:59:51) [MSC v.1928 64 bit (AMD64)]\n",
      "pyaedt info: Project Project105 has been created.\n",
      "pyaedt info: No design is present. Inserting a new design.\n",
      "pyaedt info: Design Loaded\n",
      "pyaedt info: Successfully loaded project materials !\n",
      "pyaedt info: Materials Loaded\n",
      "pyaedt info: Boundary Radiation Rad__5YS6L0 has been correctly created.\n",
      "pyaedt info: Enabling Material Override\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from pyaedt import Desktop, Hfss, constants\n",
    "\n",
    "hfss = Hfss(specified_version=\"2021.2\", non_graphical=True)\n",
    "hfss.modeler.model_units = \"um\"\n",
    "p = hfss.modeler.primitives\n",
    "\n",
    "def create_line(pts):\n",
    "    p.create_polyline(pts,\n",
    "                      xsection_type='Rectangle',\n",
    "                      xsection_width=width,\n",
    "                      xsection_height=thickness, \n",
    "                      matname='copper', \n",
    "                      name='spiral')\n",
    "\n",
    "pts = [(x0, y0, 0) for (x0, y0) in spiral(rin, (width + spacing), Np, Nr)]\n",
    "create_line(pts)\n",
    "\n",
    "x0, y0, z0 = pts[0]\n",
    "x1, y1, z1 = pts[-1]\n",
    "\n",
    "create_line([(x0 - width / 2, y0, -gap), (abs(x1) + 5, y0, -gap)])\n",
    "p.create_rectangle(constants.PLANE.YZ,\n",
    "                   (abs(x1) + 5, y0 - width / 2, -gap - thickness / 2),\n",
    "                   (width, -Tsub + gap),\n",
    "                   name='port1')\n",
    "\n",
    "create_line([(x1 + width / 2, y1, 0), (x1 - 5, y1, 0)])\n",
    "\n",
    "p.create_rectangle(constants.PLANE.YZ,\n",
    "                   (x1 - 5, y1 - width / 2, -thickness / 2),\n",
    "                   (width, -Tsub),\n",
    "                   name='port2')\n",
    "\n",
    "p.create_box((x0 - width / 2, y0 - width / 2, -gap - thickness / 2),\n",
    "             (width, width, gap + thickness),\n",
    "             matname='copper', name='via')\n",
    "\n",
    "p.create_box([x1 - 20, x1 - 20, -Tsub - thickness / 2],\n",
    "             [-2 * x1 + 40, -2 * x1 + 40, Tsub],\n",
    "             matname='silicon')\n",
    "\n",
    "p.create_box([x1 - 20, x1 - 20, -Tsub - thickness / 2],\n",
    "             [-2 * x1 + 40, -2 * x1 + 40, -0.1],\n",
    "             matname='PEC')\n",
    "\n",
    "box = p.create_box([x1 - 20, x1 - 20, -Tsub - thickness / 2 - 0.1],\n",
    "                   [-2 * x1 + 40, -2 * x1 + 40, 100],\n",
    "                   name='airbox',\n",
    "                   matname='air')\n",
    "\n",
    "hfss.assign_radiation_boundary_to_objects('airbox')\n",
    "hfss.change_material_override()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "648c1217",
   "metadata": {},
   "source": [
    "## Add Ports, Setup and Run Simulation"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "289c6ff4",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "pyaedt info: Boundary LumpedPort Port_VHI0DV has been correctly created.\n",
      "pyaedt info: Boundary LumpedPort Port_0313BG has been correctly created.\n",
      "pyaedt info: Linear count sweep Sweep_6B0PRG has been correctly created\n",
      "pyaedt info: Saving Project105 Project\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "hfss.create_lumped_port_to_sheet(sheet_name='port1', axisdir=constants.AXIS.Z)\n",
    "hfss.create_lumped_port_to_sheet(sheet_name='port2', axisdir=constants.AXIS.Z)\n",
    "\n",
    "setup1 = hfss.create_setup(setupname='setup1')\n",
    "setup1.props['Frequency'] = '10GHz'\n",
    "hfss.create_frequency_sweep('setup1', 'GHz', 1e-3, 50)\n",
    "setup1.update()\n",
    "\n",
    "hfss.save_project()\n",
    "\n",
    "hfss.analyze_all()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "638a71b5",
   "metadata": {},
   "source": [
    "## Extract S Parameter and Plot L and Q"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "4b6bf1a8",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "pyaedt info: Solution Data Correctly Loaded.\n",
      "pyaedt info: Solution Data Correctly Loaded.\n",
      "pyaedt info: Saving Project105 Project\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x1f27e3f7f10>]"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAs8AAAEGCAYAAACafXhWAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8/fFQqAAAACXBIWXMAAAsTAAALEwEAmpwYAABCm0lEQVR4nO3dd3ib1d3G8e/RsOXt2ImdOE7i7L2dhE2SskdC2JRdRqFQSqF9yyptG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aY59tnRXDzPALoHjh6NAc4H3nU4Uyi8C1waOH8p8I6DWRotMN7qaWCJtfafdW6K+PYZY9oEei4wxsQBx1M7PnAScHbgbhHZNmvtrdbabGttDrV/Y19aay8kCtoGYIxJMMYk7T0PnAAsJArel2GqJey3o+K9E837bNB+mwhtW3Pts6N6hUFjzCnUjutxA89Ya+91NlHTGGNeAUYCrYFtwJ+At4HXgI7AOuBca+2PD1AJe8aYo4ApwAK+H4N1G7Vj6CK6fcaYAdQeoOCm9gPra9bau4wxXaj91J8GzAEustZWOJe0aQJf//3OWntatLQt0I63Ahc9wMvW2nuNMelE+PsyXEXTflv77Ihun/bbEdi25tpnR3XxLCIiIiISTNE8bENEREREJKhUPIuIiIiI1JOKZxERERGRelLxLCIiIiJSTyqeRURERETqSSsMStQzxtRQO53SXmdYa9c6FEdERA5B+20JZ5qqTqKeMabYWpt4gNsMtX8H/v3dLiIizU/7bQlnGrYhLY4xJscYs8wY8wK1Kw91MMb83hgzwxgz3xjzlzr3vd0Ys9wY87Ux5hVjzO+cSy4i0jJpvy3hRMM2pCWIM8bMDZxfA/wW6A5caq39zhhzQuDycMAA7xpjjgFKqF26dBC1fyuzgVnNG11EpEXSflvClopnaQnKrLWD9l4wxuQA66y13wWuOiFwmhO4nEjtTjkJeMtaWxp43LvNFVhEpIXTflvClopnaalK6pw3wN+stf+tewdjzI3NmkhERA5G+20JCxrzLAKfAL8wxiQCGGPaG2MygMnAGcaYOGNMEnC6kyFFRGQf7bfFMep5lhbPWvupMaY38G3tQdwUAxdZa2cbYyYA84DtwAwHY4qISID22+IkTVUnUk/GmD8DxdbaB5zOIiIih6b9toSChm2IiIiIiNSTep5FREREROpJPc8iIiIiIvWk4llEREREpJ5UPIuIiIiI1JOKZxERERGRelLxLCIiIiJST/8P/B6CmFEoWoAAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 864x288 with 2 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(12,4))\n",
    "\n",
    "\n",
    "L_formula = '1e9*im(1/Y(1,1))/(2*pi*freq)'\n",
    "f, m = [], []\n",
    "x = hfss.post.get_report_data(L_formula)\n",
    "\n",
    "for freq in x.solutions_data_real[L_formula]:\n",
    "    mag = x.solutions_data_real[L_formula][freq]\n",
    "    f.append(freq[0])\n",
    "    m.append(mag)\n",
    "\n",
    "ax1.grid()\n",
    "ax1.set_xlabel('Freq')\n",
    "ax1.set_ylabel('L(nH)')\n",
    "ax1.plot(f, m)\n",
    "\n",
    "L_formula = 'im(Y(1,1))/re(Y(1,1))'\n",
    "f, m = [], []\n",
    "x = hfss.post.get_report_data(L_formula)\n",
    "hfss.save_project()\n",
    "for freq in x.solutions_data_real[L_formula]:\n",
    "    mag = x.solutions_data_real[L_formula][freq]\n",
    "    f.append(freq[0])\n",
    "    m.append(-mag)\n",
    "\n",
    "ax2.grid()\n",
    "ax2.set_xlabel('Freq')\n",
    "ax2.set_ylabel('Q')\n",
    "ax2.plot(f, m)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "76b552ab",
   "metadata": {},
   "source": [
    "## Plot 3D Field"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "f67321d0",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "D:\\temp\\Project105.aedtresults\n",
      "pyaedt info: PyVista plot generation took 0.0468745231628418 seconds.\n"
     ]
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "b325821103af4a6682f96f8140e10258",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "ViewInteractiveWidget(height=768, layout=Layout(height='auto', width='100%'), width=1024)"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Field Generation, export and plot time:  0.6702241897583008\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "['D:\\\\temp\\\\Project105.aedtresults\\\\ComplexMag_E_2WL6RU.jpg']"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "surf = []\n",
    "for i in ['spiral', 'spiral_1', 'spiral_2', 'via']:\n",
    "    surf += hfss.modeler.get_object_faces(i)\n",
    "intrinsic = {\"Freq\": \"10GHz\", \"Phase\": \"0deg\"}\n",
    "plot1 = hfss.post.create_fieldplot_surface(surf, \"ComplexMag_E\", \"setup1 : LastAdaptive\", intrinsic)\n",
    "path = os.path.join(hfss.project_path, hfss.project_name + \".aedtresults\")\n",
    "print(path)\n",
    "hfss.post.plot_field_from_fieldplot(\n",
    "    plot1.name,\n",
    "    project_path=path,\n",
    "    meshplot=True,\n",
    "    setup_name=\"setup1 : LastAdaptive\",\n",
    "    intrinsic_dict=intrinsic,\n",
    "    imageformat=\"jpg\",\n",
    "    view=\"isometric\",\n",
    "    off_screen=True,\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "0d62b55f",
   "metadata": {},
   "source": [
    "## Export Animation Gif of Mag_E"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "78cd2670",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "D:\\temp\\Project105.aedtresults\\Mag_E_3WTDKH0\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "ERROR:root:1: #version 150\n"
     ]
    }
   ],
   "source": [
    "phases = [str(i * 5) + \"deg\" for i in range(18)]\n",
    "hfss.post.animate_fields_from_aedtplt_2(\n",
    "    quantityname=\"Mag_E\",\n",
    "    object_list= [\"Global:XY\"],\n",
    "    plottype=\"CutPlane\",\n",
    "    meshplot=False,\n",
    "    setup_name=\"setup1 : LastAdaptive\",\n",
    "    intrinsic_dict={\"Freq\": \"10GHz\", \"Phase\": \"0deg\"},\n",
    "    project_path=path,\n",
    "    variation_variable=\"Phase\",\n",
    "    variation_list=phases,\n",
    "    off_screen=False,\n",
    "    export_gif=True,\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "2db56dd4",
   "metadata": {},
   "source": [
    "## Close Desktop and Release License"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "53f73534",
   "metadata": {},
   "outputs": [],
   "source": [
    "hfss.release_desktop()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "a10f0e01",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
